
*************************************************
*Do File for "Birds of a Feather"				*
*Foreign Policy Analysis						*
*Last Revised: January 2021						*
*By Bryan R. Early, University at Albany,SUNY	*
*Contact: bearly@albany.edu						*
*************************************************

 
/*

  There are two distinct data sets and analyses employed in "Birds of a Feather." This do file and dataset is for the analysis on nuclear cooperation agreements, 
  which corresponds to Table 4 in the main text. Use "Birds of a Feather - Nuclear Cooperation Agreements Analysis - Data Set.dta"  

  In order to run this analysis, the user-created ado files for Firth's Logit and Rare Events Logit are required. They are accessible the following ways:

  *Firth's Logit: This package can be installed directly from STATA with the following STATA command:
  net install firthlogit.pkg

  *Rare Events Logit: This package is available via manual download from Gary King's website located here: https://gking.harvard.edu/relogit 
  Users can download the zip file and then copy and paste the commands into their STATA ado folder.

*/

**Table 4: Analysis of the Determinants of Civil Nuclear Cooperation**

eststo M1: logit  NCA_lead  Sanct1 Sanct2 Sanct3 dpact cwongo eeriv sprival pursueNNWS gdp1 gdp2 distance expab exp_pressure noNCAyrs noNCAyrs_sq noNCAyrs_cb if ccode1!=2 & ccode2!=2, robust
eststo M2: relogit  NCA_lead  Sanct1 Sanct2 Sanct3 dpact cwongo eeriv sprival pursueNNWS gdp1 gdp2 distance expab exp_pressure noNCAyrs noNCAyrs_sq noNCAyrs_cb if ccode1!=2 & ccode2!=2
eststo M3: firthlogit  NCA_lead  Sanct1 Sanct2 Sanct3 dpact cwongo eeriv sprival pursueNNWS gdp1 gdp2 distance expab exp_pressure noNCAyrs noNCAyrs_sq noNCAyrs_cb if ccode1!=2 & ccode2!=2
esttab M1 M2 M3,  se(2) pr2 b(3) star(* 0.10 ** 0.05 *** 0.01)

logit  NCA_lead  Sanct1 Sanct2 Sanct3 dpact cwongo eeriv sprival pursueNNWS gdp1 gdp2 distance expab exp_pressure noNCAyrs noNCAyrs_sq noNCAyrs_cb if ccode1!=2 & ccode2!=2, robust 
test Sanct1 Sanct2 Sanct3
listcoef

eststo M4: logit  		NCA_lead  Sanct0 Sanct2 Sanct3 dpact cwongo eeriv sprival pursueNNWS gdp1 gdp2 distance expab exp_pressure noNCAyrs noNCAyrs_sq noNCAyrs_cb if ccode1!=2 & ccode2!=2, robust
eststo M5: relogit  	NCA_lead  Sanct0 Sanct2 Sanct3 dpact cwongo eeriv sprival pursueNNWS gdp1 gdp2 distance expab exp_pressure noNCAyrs noNCAyrs_sq noNCAyrs_cb if ccode1!=2 & ccode2!=2
eststo M6: firthlogit  	NCA_lead  Sanct0 Sanct2 Sanct3 dpact cwongo eeriv sprival pursueNNWS gdp1 gdp2 distance expab exp_pressure noNCAyrs noNCAyrs_sq noNCAyrs_cb if ccode1!=2 & ccode2!=2
esttab M4 M5 M6,  se(2) pr2 b(3) star(* 0.10 ** 0.05 *** 0.01)


**Appendix Table A7: Summary Statistics for the Civil Nuclear Cooperation Analyses’ Variables**
summ NCA_lead  Sanct1 Sanct2 Sanct3 dpact cwongo eeriv sprival pursueNNWS gdp1 gdp2 distance expab exp_pressure noNCAyrs if ccode1!=2 & ccode2!=2

**Appendix Table A8: Summary Statistics for the Civil Nuclear Cooperation Analyses’ Variables - Directed Dyads Never Sanctioned by U.S.**
summ NCA_lead  Sanct1 Sanct2 Sanct3 dpact cwongo eeriv sprival pursueNNWS gdp1 gdp2 distance expab exp_pressure noNCAyrs if ccode1!=2 & ccode2!=2 & EverSanct==0

**Appendix Table A9: Summary Statistics for the Civil Nuclear Cooperation Analyses’ Variables - Directed Dyads Sanctioned by the U.S.**

summ NCA_lead  Sanct1 Sanct2 Sanct3 dpact cwongo eeriv sprival pursueNNWS gdp1 gdp2 distance expab exp_pressure noNCAyrs if ccode1!=2 & ccode2!=2 & EverSanct==1

** Appendix	Table A10: Correlation Matrix for the Civil Nuclear Cooperation Analyses’ Variables**
corr NCA_lead  Sanct1 Sanct2 Sanct3 dpact cwongo eeriv sprival pursueNNWS gdp1 gdp2 distance expab exp_pressure noNCAyrs if ccode1!=2 & ccode2!=2


**Appendix Table A11: Analysis of the Determinants of Civil Nuclear Cooperation Using a Constrained Model**

eststo M7: logit  NCA_lead  Sanct1 Sanct2 Sanct3 cwongo pursueNNWS gdp1 gdp2 distance noNCAyrs noNCAyrs_sq noNCAyrs_cb if ccode1!=2 & ccode2!=2, robust
eststo M8: relogit  NCA_lead  Sanct1 Sanct2 Sanct3 cwongo pursueNNWS gdp1 gdp2 distance noNCAyrs noNCAyrs_sq noNCAyrs_cb if ccode1!=2 & ccode2!=2 
eststo M9: firthlogit  NCA_lead  Sanct1 Sanct2 Sanct3 cwongo pursueNNWS gdp1 gdp2 distance noNCAyrs noNCAyrs_sq noNCAyrs_cb if ccode1!=2 & ccode2!=2
esttab M7 M8 M9,  se(2) pr2 b(3) star(* 0.10 ** 0.05 *** 0.01)

**Appendix Table A12: Analysis of the Determinants of Civil Nuclear Cooperation with U.S. Observations Included**

eststo M10: logit  NCA_lead  Sanct1 Sanct2 Sanct3 dpact cwongo eeriv sprival pursueNNWS gdp1 gdp2 distance expab exp_pressure noNCAyrs noNCAyrs_sq noNCAyrs_cb, robust
eststo M11: relogit  NCA_lead  Sanct1 Sanct2 Sanct3 dpact cwongo eeriv sprival pursueNNWS gdp1 gdp2 distance expab exp_pressure noNCAyrs noNCAyrs_sq noNCAyrs_cb 
eststo M12: firthlogit  NCA_lead  Sanct1 Sanct2 Sanct3 dpact cwongo eeriv sprival pursueNNWS gdp1 gdp2 distance expab exp_pressure noNCAyrs noNCAyrs_sq noNCAyrs_cb 
esttab M10 M11 M12,  se(2) pr2 b(3) star(* 0.10 ** 0.05 *** 0.01)


**Appendix Table A13: Cross Tab of NCAs by Dyads Never Sanctioned by the U.S. Compared to Directed Dyads that Experienced U.S. Sanctions**

tab  NCA_lead EverSanct, col

**Appendix Table A14: Analysis of the Determinants of Civil Nuclear Cooperation in Directed Dyads with a Party Sanctioned by the U.S. from 1950-2000**

eststo M13: logit  NCA_lead  Sanct1 Sanct2 Sanct3 dpact cwongo eeriv sprival pursueNNWS gdp1 gdp2 distance expab exp_pressure noNCAyrs noNCAyrs_sq noNCAyrs_cb if ccode1!=2 & ccode2!=2 & EverSanct==1, robust
eststo M14: relogit  NCA_lead  Sanct1 Sanct2 Sanct3 dpact cwongo eeriv sprival pursueNNWS gdp1 gdp2 distance expab exp_pressure noNCAyrs noNCAyrs_sq noNCAyrs_cb if ccode1!=2 & ccode2!=2 & EverSanct==1
eststo M15: firthlogit  NCA_lead  Sanct1 Sanct2 Sanct3 dpact cwongo eeriv sprival pursueNNWS gdp1 gdp2 distance expab exp_pressure noNCAyrs noNCAyrs_sq noNCAyrs_cb if ccode1!=2 & ccode2!=2 & EverSanct==1
esttab M13 M14 M15,  se(2) pr2 b(3) star(* 0.10 ** 0.05 *** 0.01)


eststo M16: logit  NCA_lead  Sanct0 Sanct2 Sanct3 dpact cwongo eeriv sprival pursueNNWS gdp1 gdp2 distance expab exp_pressure noNCAyrs noNCAyrs_sq noNCAyrs_cb if ccode1!=2 & ccode2!=2 & EverSanct==1, robust
eststo M17: relogit  NCA_lead  Sanct0 Sanct2 Sanct3 dpact cwongo eeriv sprival pursueNNWS gdp1 gdp2 distance expab exp_pressure noNCAyrs noNCAyrs_sq noNCAyrs_cb if ccode1!=2 & ccode2!=2 & EverSanct==1
eststo M18: firthlogit  NCA_lead  Sanct0 Sanct2 Sanct3 dpact cwongo eeriv sprival pursueNNWS gdp1 gdp2 distance expab exp_pressure noNCAyrs noNCAyrs_sq noNCAyrs_cb if ccode1!=2 & ccode2!=2 & EverSanct==1
esttab M16 M17 M18,  se(2) pr2 b(3) star(* 0.10 ** 0.05 *** 0.01)


**Calculating the Observed Effects of U.S. Sanctions on Nuclear Cooperation Suppliers and Recipients for Table 4**

/* Note: Make sure to clear the results after running these observed value predictions** */

logit  		NCA_lead  Sanct1 Sanct2 Sanct3 dpact cwongo eeriv sprival pursueNNWS gdp1 gdp2 distance expab exp_pressure noNCAyrs noNCAyrs_sq noNCAyrs_cb if ccode1!=2 & ccode2!=2, robust 

replace Sanct1=0
replace Sanct2=0
replace Sanct3=0

predict predNoSanct if e(sample)

replace Sanct1=0
replace Sanct2=0
replace Sanct3=1

predict predBothSanct if e(sample)

gen effectsBoth= predNoSanct-predBothSanct

summ effectsBoth predNoSanct-predBothSanct


replace Sanct1=1
replace Sanct2=0
replace Sanct3=0

predict predImpSanct if e(sample)

gen effectsBothvImp= predImpSanct-predBothSanct

clear


